#include "triangle_iterator.h"
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <vector>

int main()
{
	point p1; point p2; point p3;

	std::cin >> p1 >> p2 >> p3;

	segment segm12(p1, p2);
	segment segm13(p1, p3);
	segment segm23(p2, p3);

	std::copy(triangle_iterator(segm12, segm13, segm23), triangle_iterator(segm12, segm13, segm23, true), std::ostream_iterator<point>(std::cout,"\n"));
}